<template>
	<!-- 单元格 -->
	<view class="entertheshop van-cell" @click="toLink">
		<!-- 内容 -->
		<!-- <van-cell
      :icon="datas.icon"
      :title="datas.shopName"
      is-link
      :value="datas.copywriting"
      :to="datas.type==10?datas.http.externalLink:''"
      :url="datas.type==11?datas.http.externalLink:''"
    /> -->

		<view style="display: flex;align-items: center;">
			<image v-if="datas.icon" :src="datas.icon" mode="widthFix" style="width: 70rpx;height: 70rpx"></image>
			<text style="padding-left: 20rpx;font-size: 32rpx;">
				{{datas.shopName}}
			</text>
		</view>
		<!-- <view class="gui-color-gray" style="display: flex;align-items: center;">
			{{datas.copywriting}}
			<text class="gui-icons" style="font-size: 32rpx;">&#xe601;</text>
		</view> -->

	</view>
</template>

<script>
	export default {
		name: 'entertheshop',
		props: {
			datas: {
				type: Object,
				default: () => {
					return {
						text: '单元格',
						icon: '', // 左侧图标
						shopName: '左侧标题',
						copywriting: '右侧内容',
						type: '10',
						http: {},
					}
				}
			},
		},
		methods: {
			toLink() {
				console.log("entertheshop->tolink", this.datas);
				// console.log("entertheshop->tolink", this.datas.http.externalLink);

				let d = {
					linktype: this.datas.type,
					http: {
						externalLink: this.datas.http.externalLink
					}
				}

				if (this.datas.http.externalLink) {
					this.$emit("nav", {
						"type": "entertheshop",
						"data": d
					});
				}

			}
		}
	}
</script>

<style scoped lang="less">
	.entertheshop {
		display: flex;
		justify-content: space-between;
		line-height: 60rpx;
	}

	.van-cell {
		position: relative;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		box-sizing: border-box;
		padding: 8px 16px;
		overflow: hidden;
		color: #fff;
		font-size: 14px;
		line-height: 24px;
		background: url('../../static/tesebj.png') 100% 100%;

	}
</style>